#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>

int main(){
	pid_t pid=fork();
	if(pid==-1)exit(1);
	if(pid==0){
		printf("fork:%d %d\n",getpid(),getppid());
		exit(5);
	}else{
		printf("main:%d %d\n",getpid(),getppid());
	}
	return 0;
}
